Memory devices are often used to store data provided by a host device. In many situations, the host device needs to copy or move previously-stored data from one location in the memory device to another location in the memory device, such as, for example, when the host device is defragmenting the memory device. Standard storage device interfaces, such as Serial Advanced Technology Attachment (SATA), FiberChannel, and Serial Attached SCSI (SAS), do not define commands to trigger the memory device to perform a copy or move operation on its own based on logical addresses provided by the host device. Accordingly, to copy or more data in the memory device, the host device uses standard read/write commands in existing storage device interfaces. Specifically, the host device sends a standard read command to the memory device via a bus and specifies a logical address of a source location in the memory. The memory device then translates the logical address to a physical address, reads the data from the source location, and sends the read data over the bus to the host device. The host device then stores the read data in a buffer and later sends the read data back to the memory device over the bus along with a standard write command that specifies a logical address of the destination location in the memory. The memory device then translates the logical address to a physical address and writes the data to the destination location.
There are several disadvantages associated with this process of copying and moving data. Since the host device is involved in every step of the process, this process occupies the central processing unit (CPU) of the host device, wastes power, blocks other user operations that otherwise could have been performed, and requires that the host device contain a buffer to store read data. This process also ties-up the communication bus between the host device and the memory device since data is sent from the memory device to the host device and then back to the memory device. Finally, it prevents the memory device management system from performing more sophisticated optimization, such as avoiding the copy operation entirely and simply changing the internal host to memory mapping.
While standard storage device interfaces do not define commands to trigger the memory device to perform a copy or move operation on its own based on logical addresses provided by the host device, a host device can provide a command to some NAND memory devices to copy or move data between physical addresses specified by the host device. This command would be performed on a raw Flash physical device level (i.e., on the memory chip itself) and would be issued by the host device, for example, to perform a wear leveling or erase block management operation. However, ECC operations are not performed in such copy/move operations at the physical device level because error correcting code (ECC) operations are performed by a component external to the memory chip. Accordingly, the memory chip does not check or regenerate ECC, so any errors that are present in the read data would be propagated.